package org.sharing.design.factory.impl;

import org.sharing.design.factory.AwardService;
import org.sharing.design.factory.shop.goods.DeliverReq;
import org.sharing.design.factory.shop.goods.GoodsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;

/**
 * @author: Dragon
 * @since: 2024/4/6 12:44
 */
public class GoodsAwardServiceImpl implements AwardService {

    private Logger logger = LoggerFactory.getLogger(GoodsAwardServiceImpl.class);

    private GoodsService goodsService = new GoodsService();
    @Override
    public void sendAward() {

        DeliverReq deliverReq = new DeliverReq();
        deliverReq.setUserName("10001");
        deliverReq.setUserPhone("18561591227");
        deliverReq.setSku("9820198721311");
        deliverReq.setOrderId("1023000020112221113");
        deliverReq.setConsigneeUserName("张龙");
        deliverReq.setConsigneeUserPhone("18561591227");
        deliverReq.setConsigneeUserAddress("山东省.滨州市.博兴县");

        Boolean isSuccess = goodsService.deliverGoods(deliverReq);

        logger.info("发放优惠券");
        logger.info("测试结果：{}", isSuccess);
    }
}
